package proxy.general;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Author：LJ
 * @Description：
 * @Date: 2017/11/27
 * @Modified By:
 */
public class ProxyInvocationHandler implements InvocationHandler {
    //被代理对象
    Object object = null;

    ProxyInvocationHandler(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result=method.invoke(this.object,args);
        return result;
    }
}
